package cn.rkylin.oms.warehouse.returnStockin.service;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import cn.rkylin.core.service.ApolloService;
import cn.rkylin.oms.warehouse.returnStockin.dao.ReturnStockinDAO;
import cn.rkylin.oms.warehouse.returnStockin.domain.ReturnStockin;
import cn.rkylin.oms.warehouse.returnStockin.vo.ReturnStockinVO;

/**
 * 退货入库单Service
 * 
 * @author 齐涛
 * @version 1.0
 * @created 28-9-2017 10:51:30
 */
@Repository(value = "returnStockinService")
public class ReturnStockinServiceImpl extends ApolloService implements IReturnStockinService {

    @Autowired
    private ReturnStockinDAO ReturnStockinDAOImpl;

    /**
     * 修改退货入库单
     * 
     * @param returnStockinVO
     *            退货入库单VO
     * @return 更新条数
     * @throws Exception
     *             异常
     */
    public int updateReturnStockin(ReturnStockinVO returnStockinVO) throws Exception {
        ReturnStockin returnStockin = new ReturnStockin();
        BeanUtils.copyProperties(returnStockinVO, returnStockin);
        return ReturnStockinDAOImpl.updateReturnStockin(returnStockin);
    }

}
